package com.example.backend.mapper;

import com.example.backend.entity.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {

    // 重名验证
    Boolean select_user_urn(@Param("username") String username);

    // 登录验证
    User select_user_login(@Param("username") String username);

    // 注册
    void insert_user_register(
            @Param("username") String username,
            @Param("password") String password,
            @Param("permission") Integer permission
    );

    // 验证key
    Boolean select_key(@Param("key") String key);

    // 删除key
    void delete_key(@Param("key") String key);

}
